:root {
  --borderColor: #5e5e5e;
  --bgcolorCanvas: #e8e8e8;
  --rotateHeight: 16px;
  --rotateColor: rgba(0, 0, 0, 0.5);
}

.icon-symbol {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  fill: currentColor;
  overflow: hidden;
}

@font-face {
  font-family: 'iconfont';
  src: url('./font/icon/iconfont.eot');
  src: url('./font/icon/iconfont.eot?#iefix') format('embedded-opentype'),
      url('./font/icon/iconfont.woff2') format('woff2'),
      url('./font/icon/iconfont.woff') format('woff'),
      url('./font/icon/iconfont.ttf') format('truetype'),
      url('./font/icon/iconfont.svg#iconfont') format('svg');
}
.iconfont {
  font-family: "iconfont" !important;
  font-size: 16px;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body, html {
  height: 100vh;
  background: #8e8e8e;
}

.footer {
  width: 100%;
  padding: 10px 20px;
  position: fixed;
  bottom: 0;
  left: 0;
  background: #24292e;
  z-index: 999;
}

.github-icon {
  display: inline-block;
  height: 30px;
  width: 30px;
  margin-right: 10px;
  background: 50% 130% / 80% no-repeat url('../src/github.png') #e8e8e8;
  font-size: 0;
  border-radius: 26px;
}

.github-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d0d0d0;
  font-size: 16px;
  text-decoration: none;
  transition: all .3s;
}
.github-link:hover {
  color: #fff;
}

.ml10 {
  margin-left: 10px;
}
.container {
  width: 100%;
  height: 100vh;
  text-align: center;
}

.container > div {
  width: 50%;
  height: 100%;
  float: left;
  position: relative;
  overflow: auto;
}
.container > div:first-child {
  border-right: 1px dashed orange;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  width: 100%;
  padding: 10px 0;
  margin-bottom: 50px;
  align-items: center;
  background: #ffffff;
  border-radius: 6px;
}
.rotate-item-wrapper {
  margin-top: 10px;
  width: 100%;
}

.toolbar input[type="file"] {
  display: none;
  padding: 10px;
  color: #fff;
  background: #1890ff;
  border-radius: 6px;
}

.clip-area-action {
  position: absolute;
  bottom: 0;
  right: 0;
  transform: translate(10%, 120%);
}
.clip-area-action button {
  font-size: 14px;
}
.clip-area-action .icon-symbol {
  width: 14px;
  height: 14px;
}

button {
  padding: 8px;
  color: #fff;
  position: relative;
  outline: none;
  font-size: 16px;
  font-weight: 300;
  border: 2px solid #1890ff;
  border-radius: 20px;
  background: #fff;
  transition: all .2s;
}

button.btn-disabled {
  color: #fff !important;
  border-color: #8f8f8f !important;
  background: #afafaf !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

button:hover {
  color: #1890ff;
  cursor: pointer;
  box-shadow: 0px 3px 12px 0px #1890ff;
}

#canvas {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  background: var(--bgcolorCanvas);
}

.editor {
  display: inline-block;
  padding-bottom: 50px;
  position: relative;
}
#canvas-wrapper {
  width: 500px;
  height: 500px;
  margin: 20px auto;
  position: relative;
  border: 2px solid snow;
  background: var(--bgcolorCanvas);
  overflow: hidden;
}

#imgClip {
  width: 300px;
  height: 300px;
  position: absolute;
  top: calc(50% - 150px);
  left: calc(50% - 150px);
  border: 1px solid var(--borderColor);
  background: rgba(255, 255, 255, 0.3);
}

.imgClip-resize {
  width: 8px;
  height: 8px;
  position: absolute;
  background: #fff;
  border: 1px solid var(--borderColor);
}
.imgClip-resize-left-top {
  left: -4px;
  top: -4px;
  cursor: se-resize;
}
.imgClip-resize-top {
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  cursor: n-resize;
}
.imgClip-resize-right-top {
  top: -4px;
  right: -4px;
  cursor: sw-resize;
}
.imgClip-resize-left {
  top: 50%;
  left: -4px;
  transform: translateY(-50%);
  cursor: e-resize;
}
.imgClip-resize-right {
  top: 50%;
  right: -4px;
  transform: translateY(-50%);
  cursor: e-resize;
}
.imgClip-resize-left-bottom {
  bottom: -4px;
  left: -4px;
  cursor: sw-resize;
}
.imgClip-resize-bottom {
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  cursor: n-resize;
}
.imgClip-resize-right-bottom {
  bottom: -4px;
  right: -4px;
  cursor: se-resize;
}

.grabbing {
  cursor: grabbing;
}

.preview-wrapper {
  display: inline-block;
  margin: 20px 50px;
  vertical-align: top;
  position: relative;
  background: cornsilk;
  border: 2px dashed orange;
  border-radius: 6px;
  font-size: 0;
}
.rotate-wrapper {
  display: inline-block;
  width: 300px;
  height: var(--rotateHeight);
  margin: 10px auto;
  position: relative;
  background: #dcf4ff;
  vertical-align: middle;
  border-radius: 2px;
  cursor: pointer;
}
.rotate-wrapper.disabled {
  cursor: not-allowed;
}
.rotate {
  display: block;
  width: 0;
  height: var(--rotateHeight);
  position: relative;
  background-color: skyblue;
  transition: width .2s;
}
.rotate-wrapper:hover .rotate-tip, .rotate.show .rotate-tip {
  visibility: visible;
  opacity: 1;
}
.rotate-tip {
  visibility: hidden;
  position: absolute;
  top: -12px;
  right: 0;
  padding: 6px;
  font-size: 12px;
  color: aliceblue;
  background: var(--rotateColor);
  border-radius: 4px;
  transform: translate(50%, -100%);
  transition: all .2s;
  opacity: 0;
  white-space: nowrap;
}
.rotate-tip::before {
  content: '';
  display: block;
  position: absolute;
  bottom: -12px;
  left: 50%;
  border: 6px solid var(--rotateColor);
  border-color: var(--rotateColor) transparent transparent transparent;
  transform: translateX(-50%);
}

.icon-symbol--scissors {
  transform: rotate(90deg);
}
